package com.lzw.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.lzw.bean.bill;
import com.lzw.dto.BillQuery;
import com.lzw.mapper.SmbmsBillMapper;
import com.lzw.service.SmbmsBillService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author wim泽
 * @since 2021-12-09
 */
@Service
public class SmbmsBillServiceImpl implements SmbmsBillService {
    @Autowired
    private SmbmsBillMapper billMapper;

    @Override
    public List<bill> getBillList(BillQuery billQuery) {

        PageHelper.startPage(1,10);
        List<bill> billList = billMapper.getBillList();
        PageInfo<bill> pageInfo = new PageInfo<>(billList);

        return billList;
    }

    @Override
    public bill getBillById(String billid) {
        bill bill = billMapper.getBillById(billid);
        return bill;
    }

    @Override
    public boolean delBillById(String billid) {
        int i = billMapper.delBillById(billid);
        return i>0 ? true: false;
    }
}
